import { Menu } from 'antd';
import { MailOutlined, ScheduleOutlined } from '@ant-design/icons';
import React from 'react';
import { Layout } from 'antd';
import { useNavigate , Outlet} from 'react-router-dom';
const { Header, Footer, Sider, Content } = Layout;

function LkRouter(props) {
    
   //-------------------------------------------☃️-----以 key 属性值跳转路由-----☃️-------------------------------------------
    
   var push = useNavigate();
    
   const goKeyrouter = function({ item, key, keyPath, domEvent }) {
       //-----🍌---🍌---🍌-----
       push(key);
   }
   
   //-------------------------------------------☃️-----以 key 属性值跳转路由-----☃️-------------------------------------------

    return (
        <div>
            <Menu theme='dark' mode="inline" defaultSelectedKeys={'/index/systemindex'}>
                <Menu.SubMenu onClick={ goKeyrouter } key="SubMenu" title="基础信息" icon={<ScheduleOutlined />}>
                    <Menu.Item key="/index/systemindex" >
                        系统首页
                    </Menu.Item>
                    <Menu.Item key="/index/mine_message" >
                        个人信息
                    </Menu.Item>
                </Menu.SubMenu>
            </Menu>
            <Menu theme='dark' mode="inline" defaultSelectedKeys={['key']}>
                <Menu.SubMenu onClick={goKeyrouter} key="SubMenu" title="数据报表" icon={<MailOutlined />}>
                    <Menu.Item key="/index/orderform" >
                        订单报表
                    </Menu.Item>
                    <Menu.Item key="/index/marketform" >
                        销售报表
                    </Menu.Item>
                    <Menu.Item key="/index/financeform" >
                        财务报表
                    </Menu.Item>
                </Menu.SubMenu>
            </Menu>
        </div>
    );
}

export default LkRouter;